package com.seecen.cywbackend.controller;

import com.seecen.cywbackend.service.FavoriteService;
import com.seecen.cywbackend.utils.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/favorite")
public class FavoriteController {
    @Resource
    private FavoriteService favoriteService;

    @PostMapping("/dynamic")
    public Result dynamicFavorite(@RequestParam Integer dynamicId,
                                 @RequestHeader String uid) {
        Long userId = Long.parseLong(uid);
        return favoriteService.dynamicFavorite(userId, dynamicId);
    }
}
